package JAVASE515;

public class JAVAPrime {
    public static void main(String[] argc){
        int count=0;
        for(int i=101;i<200;i++){
            if(Prime(i)){
                count++;
                System.out.println(i);
            }
        }
        System.out.println(count);
    }

    //定义方法判断一个数是否是质数
    public static boolean Prime(int number){
        boolean flag=true;
        for (int i = 2; i < number/2; i++) {
            if(number%i==0&&number!=2){
                flag=false;
                break;
            }
        }
        return flag;
    }
}
